package com.endbd.warehouse.controller;

import com.endbd.feignapi.model.warehouse.Warehouse;
import com.endbd.feignapi.util.PageModel;
import com.endbd.warehouse.model.WarehouseCondition;
import com.endbd.warehouse.service.IManageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/warehouse")
public class WareScanner {
    @Autowired
    private IManageService manageService;
    public IManageService getManageService() {
        return manageService;
    }
    public void setManageService(IManageService manageService) {
        this.manageService = manageService;
    }

    @RequestMapping("/queryAll")
    public PageModel<Warehouse> querys(WarehouseCondition wc, PageModel<Warehouse> pageModel){
        PageModel<Warehouse> pageBean = manageService.querys(wc,pageModel);
        return pageBean;
    }
}
